|
![](/i/fill.gif) |
Some possible reasons:
* It may have applied to old code that is no longer a part of the program
* It may have applied to an old plan that was never implemented
* It may have been a method of creating a 'sparse' enum set, to avoid
accidentally refererencing with the wrong kind--But there's a better ways to
catch that mishap:
enum animals {CAT, DOG, MOUSE};
enum colors {RED,GREEN,BLUE};
void MyAnimalFunc( animals eInput ){}; // enum type specified
int main(void)
MyAnimalFunc( CAT ); // works fine
MyAnimalFunc( RED ); // compiler gets it: cannot convert 'colors' to
'animals'
}
* It might apply to tools/utilities that reside outside the program
* I've overlooked something totally obvious, and should go get another cup
of coffee
Post a reply to this message
|
![](/i/fill.gif) |